package com.happe.foodeasy.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * 这个类用于解析manage-system-info.properties配置文件中的内容
 * Created by wubin on 2016-12-04.
 */
public class ManageSystemInfoContainer {
    private static Logger logger = LoggerFactory.getLogger(ManageSystemInfoContainer.class);

    private static Properties manageSystemProps = new Properties();

    static {
        InputStream filePath = ManageSystemInfoContainer.class.getClassLoader().getResourceAsStream("manage-system-info.properties");
        try {
            manageSystemProps.load(filePath);
        } catch (IOException e) {
            logger.error(e.getMessage());
        }
    }

    public static String retrieveUrl() {
        return manageSystemProps.getProperty("url");
    }
}
